package com.example.vueblog.controller;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.vueblog.entity.User;
import com.example.vueblog.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author yushunshun
 * @since 2022-05-27
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/testIndex")
    public String testIndex() {
        log.info("请求成功testIndex...");
        return "直接访问";
    }

    @GetMapping("/testIndex2")
    public String testIndex2() {
        return "须登录访问";
    }
}
